#ifndef PHOTO_PRINTER_H
#define PHOTO_PRINTER_H

#include <QObject>
#include <QByteArray>
#include <QString>
#include <QStringList>
#include <QPrintDialog>
#include <QPrinter>
#include <QGSettings>
#include "kylinimagecodec.h"

class PhotoPrinter : public QObject
{
    Q_OBJECT
public Q_SLOTS:
    void acceptPrint(QPrinter *printer);//打印开始
public:
    PhotoPrinter(const QStringList &picPaths);
    ~PhotoPrinter();
private:
    const QByteArray schemasId = "org.kylin-photo-printer.settings";
    const QString gsettingsFlag = "print";
    const QString gsettingsKey = "print";
    QStringList m_picPaths;
    QPrintDialog *m_printDialog;
    QPrinter *m_printer;
    QList<Mat> m_mats;

    void importPrintSettings(QPrinter *printer);
    void exportPrintSettings(QPrinter *printer);
    void finishPrint(int result);//返回值
};

#endif // PHOTO_PRINTER_H